Conversation
Co-authored-by: nemuki <43571743+nemuki@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Slack OAuth 認証なしで UI/機能確認ができる「開発モード(VITE_DEV_MODE)」を追加し、ローカル開発時のセットアップ負荷を下げる変更です。
Changes:
VITE_DEV_MODEを追加し、開発モード時は Slack 認証情報(Client ID/Secret/Redirect URI)を必須にしないように変更- 開発モード時に AuthContext がモック認証状態(ユーザープロファイル/トークン)を提供して認証フローをバイパス
- Slack リポジトリ層で API 呼び出しをシミュレーション(モック会話データ返却、通知/ログ出力)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/utils/env.ts | 開発モード判定と、Slack 関連 env の必須/任意切り替えを追加 |
| src/infra/repository/slack.ts | 開発モード時のモックデータ返却と API 呼び出しシミュレーションを追加 |
| src/context/AuthContext.tsx | 開発モード時の認証バイパス(モック認証コンテキスト)を追加 |
| .env.sample | VITE_DEV_MODE 設定例と説明を追記 |
| return value.toLowerCase() === 'true' | ||
| } | ||
|
|
||
| const isDevMode = getBooleanEnvValue('VITE_DEV_MODE') |
Comment on lines
+139
to
+143
| handleLogout: () => { | ||
| console.log('開発モード: ログアウト処理は実行されません') | ||
| }, | ||
| handleRemoveLocalStorageSlackOauthToken: () => { | ||
| console.log('開発モード: LocalStorage の削除は実行されません') |
| useEffect(() => { | ||
| // 開発モードの場合は処理をスキップ | ||
| if (env.DEV_MODE) { | ||
| setAuthIsLoading(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slack認証が不要な開発モードを実装しました。これにより、開発者はSlackアプリの認証情報なしでUIや機能をテストできるようになります。
🚀 主な機能
開発モードの有効化
# .envファイルで開発モードを有効化 VITE_DEV_MODE=trueモック認証データ
API呼び出しのシミュレーション
🛠️ 技術的な変更
環境設定の改善
VITE_DEV_MODE環境変数を追加.env.sampleに詳細な設定説明を追加AuthContext の拡張
リポジトリ層の対応
postMessages関数で開発モード分岐updateEmoji関数で開発モード分岐getConversations関数でモックデータ返却✅ 動作確認済み
📱 スクリーンショット
開発モードが有効な状態で、認証なしで全ての機能にアクセスできることを確認できます。
🎯 開発者への利点
Fixes #86.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.